package basic.com.liz.learn.design.proxy;

import basic.com.liz.learn.design.decorator.Source;
import basic.com.liz.learn.design.decorator.SourceImpl;

public class Proxy implements Source
{
    private SourceImpl sourceImpl;
    
    public Proxy()
    {
        super();
        this.sourceImpl = new SourceImpl();
    }
    
    @Override
    public void method()
    {
        before();
        sourceImpl.method();
        end();
    }
    
    private void end()
    {
        System.out.println("结束");
    }
    
    private void before()
    {
        System.out.println("开始");
    }
    
}
